import request from '@/utils/request'

// 查询列表
export function listPayment(query) {
  return request({
    url: '/purchase/payment/list',
    method: 'get',
    params: query
  })
}

export function listAll(query) {
  return request({
    url: '/purchase/payment/listAll',
    method: 'get',
    params: query
  })
}

// 查询详细
export function getPayment(paymentRecordId) {
  return request({
    url: '/purchase/payment/' + paymentRecordId,
    method: 'get'
  })
}

// 新增
export function addPayment(data) {
  return request({
    url: '/purchase/payment',
    method: 'post',
    data: data
  })
}

// 修改
export function updatePayment(data) {
  return request({
    url: '/purchase/payment',
    method: 'put',
    data: data
  })
}

// 删除
export function delPayment(paymentRecordId) {
  return request({
    url: '/purchase/payment/' + paymentRecordId,
    method: 'delete'
  })
}
